class Solution {    public void merge(int[] nums1, int m, int[] nums2, int n) {        int p1 = m - 1;        int p2 = n - 1;        int p = m + n - 1;        while ((p1 >= 0) && (p2 >= 0)) {            nums1[p--] = nums1[p1] > nums2[p2] ? nums1[p1--] ? nums2[p2--];        }        //拷贝数组内容        System.arraycopy(nums2, 0, nums1, 0, p2 + 1);        return nums1;    }    public static void main(String[] args) {        Solution solution = new Solution();        int[] nums1 = new int[1, 2, 3, 8, 0, 0, 0];        int[] nums2 = new int[2, 5, 6];        int m = 4, n = 3;        nums1 = solution.merge(nums1, m, nums2, n);        for (int i : nums1) {            System.out.print(i + " ");        }    }}